<!DOCTYPE html>

<html lang="en">



<head>

	<meta charset="UTF-8">

	<title>统计营业</title>

	<meta content="width=device-width,initial-scale=1.0,minimum-scale=1.0.maximum-scale=1.0,user-scalable=no"

		name="viewport">

	<link rel="stylesheet" href="css/reset.css">

	<link rel="stylesheet" href="css/Statistics.css">

	<link rel="stylesheet" href="css/flexible.css">

	<link rel="stylesheet" href="css/vant.css">

	<link rel="stylesheet" href="css/boss.css">

	<script src="js/vue/vue.js"></script>

	<script src="js/vue/qs.js"></script>

	<script src="js/vue/axios.js"></script>

	<script src="js/vue/MD5.js"></script>

	<script src="js/jquery-3.3.1.min.js"></script>

	<script src="js/fontsize.js"></script>

	<script src="js/glabe.js"></script>

	<script src="js/vue/vant.js"></script>

	<script src="js/moment.js"></script>

</head>

<style>

	.boss_tar .nav li {

		width: 16.6%;

		font-size: 0.14rem;

	}



	html,

	body {

		height: 100%

	}



	.boss_tar {

		min-height: 97%;

		position: relative;

		padding-top: 0.1rem;

		margin: 0;

	}



	.technicalSupport {

		position: absolute;

		width: 100%;

		bottom: 0;

		margin: 0;

	}



	#app {

		height: 100%;

	}



	tr th {

		font-size: 16px;

	}



	select {

		font-size: 14px;

	}



	tr th {

		font-size: 16px;

	}



	select {

		font-size: 14px;

	}



	tr th {

		font-size: 0.15rem;

	}



	select {

		font-size: 0.14rem;

	}



	tr td {

		font-size: 0.14rem;

	}



	.time_box {

		width: 100%;

		height: 0.25rem;

		margin-bottom: 0.14rem;

		margin-top: 0.14rem;

		display: flex;

	}



	.time_box>div {

		height: 100%;

		width: 0.66rem;

		background: #DDDDDD;

		color: #fff;

		text-align: center;

		line-height: 0.25rem;

		margin-left: 0.1rem;

		font-size: 0.12rem;

	}



	.time_select {

		background: #0E9CFA !important;

	}



	.openNum {

		width: 100%;

		height: 0.7rem;

		background: #fff;

		display: flex;

		padding-left: 0.17rem;

		box-sizing: border-box;

		align-items: center;

		box-shadow: #F1F1F1 0px 0px 10px;

	}



	.openNum_title {

		font-size: 0.16rem;

		color: #303045;

		font-weight: 600;

		margin-left: 0.08rem;

	}



	.openNum_num {

		margin-left: 0.24rem;

	}



	.openNum_num_money {

		font-size: 0.1rem;

		color: #FF8B00;

	}



	.openNum_num_num {

		font-size: 0.19rem;

		color: #FF8B00;

		font-weight: 600;

	}



	.entrance_title_time {

		font-size: 0.16rem;

		color: #0079fe;

		font-weight: 600;

		margin-right: 0.2rem;

	}



	.entrance_title_num {

		color: #0079fe;

		font-weight: 600;

	}



	.entrance_list {

		padding: 0.1rem 0.3rem 0.1rem 0.2rem;

	}



	.entrance_list_item {

		display: flex;

		justify-content: space-between;

		padding: 0.1rem 0;

	}

</style>



<body>

	<div id="app">

		<div class="boss_tar">

			<ul class="nav">

				<li><span class="selected">营业</span></li>

				<li><span>会员排名</span></li>

				<li><span>会员卡</span></li>

				<li><span>员工</span></li>

				<li><span>课程</span></li>

				<!-- <li><span>入场统计</span></li> -->

			</ul>

			<template>

				<div class="content">

					<div class="list">

						<!-- <div class="yy_money">

							<div class="clearfix">

								<div>

									<select ref="addRequestState" @change="showValue()">

										<option value="day">今日</option>

										<option value="week">近一周</option>

										<option value="moon">近一月</option>

										<option value="year">近一年</option>

									</select>

								</div>

							</div>

						</div> -->

						<div class="openNum">

							<img src="images/money_open.png" alt="" style="width: 0.12rem;height: 0.14rem;">

							<span class="openNum_title">营业收入汇总</span>

							<div class="openNum_num">

								<span class="openNum_num_money">￥</span>

								<span class="openNum_num_num">{{Total_income}}</span>

							</div>

						</div>

						<div class="time_box">

							<div :class="openActive == 'day' ? 'time_select' : ''" @click="openSelect('day')">今日</div>

							<div :class="openActive == 'week' ? 'time_select' : ''" @click="openSelect('week')">近一周

							</div>

							<div :class="openActive == 'moon' ? 'time_select' : ''" @click="openSelect('moon')">近一月

							</div>

							<div :class="openActive == 'year' ? 'time_select' : ''" @click="openSelect('year')">近一年

							</div>

						</div>

						<div class="yy_money">

							<ul class="clearfix">

								<li>

									<p><span>{{Cash}}</span></p>

									<p>现金</p>

								</li>

								<li>

									<p><span>{{Wxpay}}</span></p>

									<p>微信</p>

								</li>

								<li>

									<p><span>{{Alipay}}</span></p>

									<p>支付宝</p>

								</li>

								<li>

									<p><span>{{Bycard}}</span></p>

									<p>刷卡</p>

								</li>

								<li>

									<p><span>{{Other}}</span></p>

									<p>其他</p>

								</li>

							</ul>

						</div>

						<div class="card_money">

							<div class="clearfix yy_title">

								<p class="lf">会籍卡收入</p>

								<!-- <p class="rf"><a href="#">more</a></p> -->

							</div>

							<table>

								<thead>

									<tr>

										<th>会籍卡名称</th>

										<th>销售数量</th>

										<th>销售金额</th>

									</tr>

								</thead>

								<tbody>

									<tr v-for="item in Adviser">

										<td>{{item.Cardname}}</td>

										<td>{{item.num}}</td>

										<td>{{item.Acamount}}</td>

									</tr>

								</tbody>

							</table>

						</div>

						<div class="card_money">

							<div class="clearfix yy_title">

								<p class="lf">团课卡收入</p>

							</div>

							<table>

								<thead>

									<tr>

										<th>会籍卡名称</th>

										<th>销售数量</th>

										<th>销售金额</th>

									</tr>

								</thead>

								<tbody>

									<tr v-for="item in League">

										<td>{{item.Cardname}}</td>

										<td>{{item.num}}</td>

										<td>{{item.Acamount}}</td>

									</tr>

								</tbody>

							</table>

						</div>

						<div class="card_money">

							<div class="clearfix yy_title">

								<p class="lf">私教卡收入</p>

								<!-- <p class="rf"><a href="#">more</a></p> -->

							</div>

							<table>

								<thead>

									<tr>

										<th>会籍卡名称</th>

										<th>销售数量</th>

										<th>销售金额</th>

									</tr>

								</thead>

								<tbody>
									<tr v-for="item in Private">

										<td>{{item.Cardname}}</td>

										<td>{{item.num}}</td>

										<td>{{item.Acamount}}</td>

									</tr>

					

								</tbody>

							</table>

						</div>

					</div>



					<div class="list">

						<!-- <div class="card_money">

							<div class="clearfix">

								<div>

									<select ref="acqpm" @change="acqpm()">

										<option value="day">今日</option>

										<option value="week">近一周</option>

										<option value="moon">近一月</option>

										<option value="year">近一年</option>

									</select>

								</div>

							</div>

						</div> -->

						<div class="time_box">

							<div :class="memberActive == 'day' ? 'time_select' : ''" @click="memberSelect('day')">今日

							</div>

							<div :class="memberActive == 'week' ? 'time_select' : ''" @click="memberSelect('week')">近一周

							</div>

							<div :class="memberActive == 'moon' ? 'time_select' : ''" @click="memberSelect('moon')">近一月

							</div>

							<div :class="memberActive == 'year' ? 'time_select' : ''" @click="memberSelect('year')">近一年

							</div>

						</div>

						<div class="card_money">

							<div class="clearfix">

								<p class="lf yy_collect"><span style="font-weight: 600;">按出勤排名</span></p>

							</div>

							<table>

								<thead>

									<tr>

										<th>排名</th>

										<th>会员</th>

										<th>出勤天数</th>

									</tr>

								</thead>

								<tbody>

									<tr v-for="(item,index) in Sign">

										<td>{{index+1}}</td>

										<td>{{item.Username}}</td>

										<td>{{item.Num}}</td>

									</tr>

								</tbody>

							</table>

						</div>



						<div class="card_money">

							<div class="clearfix">

								<p class="lf yy_collect" style="font-weight: 600;">按上课排名</p>

							</div>

							<ul class="select_course">

								<li :class="active_course==0?'active_course':''" @click="active(0)">团课</li>

								<li :class="active_course==1?'active_course':''" @click="active(1)">私教课</li>

							</ul>

							<table>

								<thead>

									<tr>

										<th>排名</th>

										<th>会员</th>

										<th>上课次数</th>

									</tr>

								</thead>

								<tbody>

									<tr v-for="(item,index) in Curr_t" v-if="active_course==0">

										<td>{{index+1}}</td>

										<td>{{item.Username}}</td>

										<td>{{item.Num}}</td>

									</tr>

									<tr v-for="(item,index) in Curr_p" v-if="active_course==1">

										<td>{{index+1}}</td>

										<td>{{item.Username}}</td>

										<td>{{item.Num}}</td>

									</tr>

								</tbody>

							</table>

						</div>

						<div class="card_money">

							<div class="clearfix">

								<p class="lf yy_collect" style="font-weight: 600;">按充值排名</p>

							</div>

							<table>

								<thead>

									<tr>

										<th>排名</th>

										<th>会员</th>

										<th>充值金额</th>

									</tr>

								</thead>

								<tbody>

									<tr v-for="(item,index) in Recharge">

										<td>{{index+1}}</td>

										<td>{{item.Username}}</td>

										<td>{{item.Acamount}}</td>

									</tr>

								</tbody>

							</table>

						</div>

					</div>



					<div class="list ">

						<!-- <div class="card_money">

							<div class="clearfix">								

								<div>

									<select ref="hykpm" @change="hykpm()">

										<option value="day">今日</option>

										<option value="week">近一周</option>

										<option value="moon">近一月</option>

										<option value="year">近一年</option>

									</select>

								</div>

							</div>

						</div> -->

						<div class="time_box">

							<div :class="cardActive == 'day' ? 'time_select' : ''" @click="cardSelect('day')">今日</div>

							<div :class="cardActive == 'week' ? 'time_select' : ''" @click="cardSelect('week')">近一周

							</div>

							<div :class="cardActive == 'moon' ? 'time_select' : ''" @click="cardSelect('moon')">近一月

							</div>

							<div :class="cardActive == 'year' ? 'time_select' : ''" @click="cardSelect('year')">近一年

							</div>

						</div>

						<div class="card_money">

							<div class="clearfix">

								<p class="yy_collect" style="font-weight: 600;">按会员卡类别</p>

								<ul class="list_two">

									<li>

										<p><span class="fontSize16">{{Adviser1}}</span>张</p>

										<p class="fontsize12">会籍卡</p>

									</li>

									<li>

										<p><span class="fontSize16">{{League1}}</span>张</p>

										<p class="fontsize12">团课卡</p>

									</li>

									<li>

										<p><span class="fontSize16">{{Private1}}</span>张</p>

										<p class="fontsize12">私教卡</p>

									</li>

								</ul>

								<div class="cl mb_2r"></div>

							</div>

						</div>

						<div class="card_money">

							<div class="clearfix">

								<p class="yy_collect" style="font-weight: 600;">按会员卡类型</p>

								<ul class="list_two">

									<li>

										<p><span class="fontSize16">{{Number1}}</span>张</p>

										<p class="fontsize12">次数卡</p>

									</li>

									<li>

										<p><span class="fontSize16">{{Term1}}</span>张</p>

										<p class="fontsize12">期限卡</p>

									</li>

									<li>

										<p><span class="fontSize16">{{Savings1}}</span>张</p>

										<p class="fontsize12">储值卡</p>

									</li>

								</ul>

								<div class="cl mb_2r"></div>

							</div>

						</div>



					</div>



					<div class="list">

						<!-- <div class="card_money">

							<div class="clearfix">

								<div>

									<select ref="whhypm" @change="whhypm()">

										<option value="day">今日</option>

										<option value="week">近一周</option>

										<option value="moon">近一月</option>

										<option value="year">近一年</option>

									</select>

								</div>

							</div>

						</div> -->

						<div class="time_box">

							<div :class="staffActive == 'day' ? 'time_select' : ''" @click="staffSelect('day')">今日</div>

							<div :class="staffActive == 'week' ? 'time_select' : ''" @click="staffSelect('week')">近一周

							</div>

							<div :class="staffActive == 'moon' ? 'time_select' : ''" @click="staffSelect('moon')">近一月

							</div>

							<div :class="staffActive == 'year' ? 'time_select' : ''" @click="staffSelect('year')">近一年

							</div>

						</div>

						<div class="card_money">

							<div class="clearfix">

								<p class="lf yy_collect"><span style="font-weight: 600;">维护会员排名</span></p>

							</div>

							<table>

								<thead>

									<tr>

										<th>排名</th>

										<th>姓名</th>

										<th>会员数量</th>

									</tr>

								</thead>

								<tbody>

									<tr v-for="(item,index) in Maintain_user">

										<td>{{index+1}}</td>

										<td>{{item.Sname}}</td>

										<td>{{item.Num}}</td>

									</tr>

								</tbody>

							</table>

						</div>



						<div class="card_money">

							<div class="clearfix">

								<p class="lf yy_collect" style="font-weight: 600;">维护客户排名</p>

							</div>

							<table>

								<thead>

									<tr>

										<th>排名</th>

										<th>姓名</th>

										<th>客户数量</th>

									</tr>

								</thead>

								<tbody>

									<tr v-for="(item,index) in Maintain_custom">

										<td>{{index+1}}</td>

										<td>{{item.Sname}}</td>

										<td>{{item.Num}}</td>

									</tr>

								</tbody>

							</table>

						</div>

						<div class="card_money">

							<div class="clearfix">

								<p class="lf yy_collect" style="font-weight: 600;">跟进排名</p>

							</div>

							<table>

								<thead>

									<tr>

										<th>排名</th>

										<th>姓名</th>

										<th>跟进次数</th>

									</tr>

								</thead>

								<tbody>

									<tr v-for="(item,index) in Follw_list">

										<td>{{index+1}}</td>

										<td>{{item.Sname}}</td>

										<td>{{item.Num}}</td>

									</tr>

								</tbody>

							</table>

						</div>

					</div>



					<div class="list ">

						<!-- <div class="card_money">

							<div class="clearfix">

								<div>

									<select ref="sjkcpm" @change="sjkcpm()">

										<option value="day">今日</option>

										<option value="week">近一周</option>

										<option value="moon">近一月</option>

										<option value="year">近一年</option>

									</select>

								</div>

							</div>

						</div> -->

						<div class="time_box">

							<div :class="courseActive == 'day' ? 'time_select' : ''" @click="courseSelect('day')">今日

							</div>

							<div :class="courseActive == 'week' ? 'time_select' : ''" @click="courseSelect('week')">近一周

							</div>

							<div :class="courseActive == 'moon' ? 'time_select' : ''" @click="courseSelect('moon')">近一月

							</div>

							<div :class="courseActive == 'year' ? 'time_select' : ''" @click="courseSelect('year')">近一年

							</div>

						</div>

						<div class="card_money">

							<div class="clearfix">

								<p class="lf yy_collect"><span style="font-weight: 600;">团课课程排名</span></p>

							</div>

							<table>

								<thead>

									<tr>

										<th>排名</th>

										<th>课程名称</th>

										<th>上课次数</th>

									</tr>

								</thead>

								<tbody>

									<tr v-for="(item,index) in curr_t">

										<td>{{index+1}}</td>

										<td>{{item.Title}}</td>

										<td>{{item.Num}}</td>

									</tr>

								</tbody>

							</table>

						</div>

						<div class="card_money">

							<div class="clearfix">

								<p class="lf yy_collect" style="font-weight: 600;">私教课程排名</p>

							</div>

							<table>

								<thead>

									<tr>

										<th>排名</th>

										<th>课程名称</th>

										<th>上课次数</th>

									</tr>

								</thead>

								<tbody>

									<tr v-for="(item,index) in curr_p">

										<td>{{index+1}}</td>

										<td>{{item.Title}}</td>

										<td>{{item.Num}}</td>

									</tr>

								</tbody>

							</table>

						</div>

					</div>



					<div class="list ">

						<div class="entrance_title">

							<span class="entrance_title_time" @click="isPickerTime = true">{{entranceObj.showdate}}</span>
							<!-- <span class="entrance_title_time" @click="isPickerTime = true">{{entranceObj?entranceObj.showdate:''}}</span> -->
							<span>入场：<span class="entrance_title_num">{{entranceObj? entranceObj.signcount: 0}}</span> 人次</span>

						</div>

						<div class="entrance_list">

							<div class="entrance_list_item" v-for="(item, index) in entranceObj.list"  :key="index">

								<span>{{item.moonday}}</span>

								<span>{{item.num}} 人次</span>

							</div>

						</div>

					</div>

				</div>

			</template>

			<div class="technicalSupport">由馆家提供技术支持</div>

		</div>

		<van-popup v-model="isPickerTime" round position="bottom">

			<van-datetime-picker v-model="currentDate" type="year-month" title="选择年月"

				:max-date="maxDate" :formatter="formatter" @cancel="isPickerTime = false"

				@confirm="onConfirm" />

		</van-popup>

	</div>

</body>

<script>

	$(function () {

		//获取点击事件的对象

		var divShow = $(".content").children('.list');

		$(divShow[1]).hide();

		$(divShow[2]).hide();

		$(divShow[3]).hide();

		$(divShow[4]).hide();

		$(divShow[5]).hide();

		$(".nav li span").click(function () {

			//获取要显示或隐藏的对象

			var divShow = $(".content").children('.list');

			//判断当前对象是否被选中，如果没选中的话进入if循环

			if (!$(this).hasClass('selected')) {

				//获取当前对象的索引

				var index = $(this).parent().index();

				//当前对象添加选中样式并且其同胞移除选中样式；

				$(this).addClass('selected').parent().siblings().find("span").removeClass('selected');

				//索引对应的div块显示

				$(divShow[index]).show();

				//索引对应的div块的同胞隐藏

				$(divShow[index]).siblings('.list').hide();

			}

		});

	});



	// // 课程的切换

	// $(".select_course li").on('click', function () {

	// 	if ($(this).hasClass('active_course')) {



	// 	} else {

	// 		$(this).addClass('active_course').siblings().removeClass('active_course');

	// 	}

	// })





	var app = new Vue({

		el: '#app',

		data: {

			active_course: 0,

			// 营业	取值

			openActive: 'day',

			Total_income: 0, //总收入

			Cash: 0, //现金收入	

			Wxpay: 0, //微信支付

			Alipay: 0, //支付宝支付

			Bycard: 0, //刷卡

			Other: 0,

			Adviser: [], //会籍卡列表

			League: [], //团课卡列表

			Private: [], //私教卡列表

			//会员排名 取值

			memberActive: 'day',

			Sign: [], //签到排名

			Curr_t: [], //团课排名

			Curr_p: [], //私课排名

			Recharge: [], //充值排名

			// 会员卡 取值

			cardActive: 'day',

			Adviser1: 0, //会籍卡

			League1: 0, //团课卡

			Private1: 0, //私教卡

			Term1: 0, //期限卡

			Number1: 0, //次数卡

			Savings1: 0, //储值卡

			//员工  取值

			staffActive: 'day',

			Maintain_user: [], //维护会员排名

			Maintain_custom: [], //维护客户排名

			Follw_list: [], //跟进排名

			//课程  取值

			courseActive: 'day',

			curr_t: [], //团课排名

			curr_p: [], //私课排名

			//是否显示

			isPickerTime: false,

			maxDate: new Date(),

			currentDate: new Date(),

			//入场统计数据

			entranceObj: {}

		},

		created() {

			//营业

			axios.get('/mobileapi/boss/index.php?act=business').then(res => {

				//console.log(res)

				this.Total_income = res.data.data.Total_income

				this.Cash = res.data.data.Cash

				if (this.Cash > 10000) {

					this.Cash = this.Cash / 10000

					this.Cash = this.Cash.toFixed(2) + "万元"

				} else {



				}

				this.Wxpay = res.data.data.Wxpay

				this.Alipay = res.data.data.Alipay

				this.Bycard = res.data.data.Bycard

				this.Adviser = res.data.data.Adviser

				this.League = res.data.data.League

				this.Private = res.data.data.Private

				this.Other = res.data.data.Other

				if (this.Cash > 10000) {

					this.Cash = this.Cash / 10000

					this.Cash = this.Cash.toFixed(2) + "万"

				}

				if (this.Wxpay > 10000) {

					this.Wxpay = this.Wxpay / 10000

					this.Wxpay = this.Wxpay.toFixed(2) + "万"

				}

				if (this.Alipay > 10000) {

					this.Alipay = this.Alipay / 10000

					this.Alipay = this.Alipay.toFixed(2) + "万"

				}

				if (this.Bycard > 10000) {

					this.Bycard = this.Bycard / 10000

					this.Bycard = this.Bycard.toFixed(2) + "万"

				}

				if (this.Other > 10000) {

					this.Other = this.Other / 10000

					this.Other = this.Other.toFixed(2) + "万"

				}

			}).catch(err => {

				// vant.Toast('请求发送失败，请重试');

			})

			//会员卡

			axios.get('/mobileapi/boss/index.php?act=cardlist').then(res => {

				//console.log(res)

				this.Adviser1 = res.data.data.Adviser

				this.League1 = res.data.data.League

				this.Private1 = res.data.data.Private

				this.Term1 = res.data.data.Term

				this.Number1 = res.data.data.Number

				this.Savings1 = res.data.data.Savings

			}).catch(err => {

				// vant.Toast('请求发送失败，请重试');

			})



			//会员排名

			axios.get('/mobileapi/boss/index.php?act=ranking').then(res => {

				console.log(res)

				this.Sign = res.data.data.Sign

				this.Curr_t = res.data.data.Curr_t

				this.Curr_p = res.data.data.Curr_p

				this.Recharge = res.data.data.Recharge

			}).catch(err => {

				// vant.Toast('请求发送失败，请重试');

			})



			//员工

			axios.get('/mobileapi/boss/index.php?act=staff').then(res => {

				//	console.log(res)

				this.Maintain_user = res.data.data.Maintain_user

				this.Maintain_custom = res.data.data.Maintain_custom

				this.Follw_list = res.data.data.Follw_list

			}).catch(err => {

				// vant.Toast('请求发送失败，请重试');

			})



			//课程

			axios.get('/mobileapi/boss/index.php?act=curr').then(res => {

				//	console.log(res)

				this.curr_t = res.data.data.curr_t

				this.curr_p = res.data.data.curr_p

			}).catch(err => {

				// vant.Toast('请求发送失败，请重试');

			})

			//入场统计

			axios.get('/mobileapi/boss/index.php?act=sign').then(res => {

				//	console.log(res)

				this.entranceObj = res.data.data

			}).catch(err => {

				// vant.Toast('请求发送失败，请重试');

			})

		},

		methods: {

			onConfirm(value) {

				vant.Toast.loading({

					message: '加载中...',

					forbidClick: true,

					duration: 0

				});

				//入场统计

				// let params = {sdate: moment(value).format("YYYY-DD")}

				axios.get('/mobileapi/boss/index.php?act=sign', {params: {sdate: moment(value).format("YYYY-MM")}}).then(res => {

					//	console.log(res)

					this.entranceObj = res.data.data;

					vant.Toast.clear();

					this.isPickerTime = false;

				}).catch(err => {

					vant.Toast('请求发送失败，请重试');

				})

				

			},

			formatter(type, val) {

				if (type === 'year') {

					return `${val}年`;

				} else if (type === 'month') {

					return `${val}月`;

				}

				return val;

			},

			openSelect(val) {

				this.openActive = val;

				axios.get(`/mobileapi/boss/index.php?act=business&daytype=${val}`).then(res => {

					if (res.data.code == 200) {

						this.Total_income = res.data.data.Total_income;

						this.Cash = res.data.data.Cash

						this.Wxpay = res.data.data.Wxpay;

						this.Alipay = res.data.data.Alipay;

						this.Bycard = res.data.data.Bycard;

						this.Adviser = res.data.data.Adviser;

						this.League = res.data.data.League;

						this.Private = res.data.data.Private;

						this.Other = res.data.data.Other

						if (this.Cash > 10000) {

							this.Cash = this.Cash / 10000

							this.Cash = this.Cash.toFixed(2) + "万"

						}

						if (this.Wxpay > 10000) {

							this.Wxpay = this.Wxpay / 10000

							this.Wxpay = this.Wxpay.toFixed(2) + "万"

						}

						if (this.Alipay > 10000) {

							this.Alipay = this.Alipay / 10000

							this.Alipay = this.Alipay.toFixed(2) + "万"

						}

						if (this.Bycard > 10000) {

							this.Bycard = this.Bycard / 10000

							this.Bycard = this.Bycard.toFixed(2) + "万"

						}

						if (this.Other > 10000) {

							this.Other = this.Other / 10000

							this.Other = this.Other.toFixed(2) + "万"

						}

					} else {

						vant.Toast(res.data.msg);

					}

				}).catch(err => {

					vant.Toast('请求发送失败，请重试');

				})

			},

			showValue() {

				var index = this.$refs.addRequestState.value

				console.log(index)

				axios.get(`/mobileapi/boss/index.php?act=business&daytype=${index}`).then(res => {

					console.log(res)

					this.Total_income = res.data.data.Total_income

					this.Cash = res.data.data.Cash

					this.Wxpay = res.data.data.Wxpay

					this.Alipay = res.data.data.Alipay

					this.Bycard = res.data.data.Bycard

					this.Adviser = res.data.data.Adviser

					this.League = res.data.data.League

					this.Private = res.data.data.Private

					this.Other = res.data.data.Other

				}).catch(err => {

					// vant.Toast('请求发送失败，请重试');

				})

			},



			// 会员排名  筛选

			memberSelect(val) {

				this.memberActive = val;

				axios.get(`/mobileapi/boss/index.php?act=ranking&daytype=${val}`).then(res => {

					if (res.data.code == 200) {

						this.Sign = res.data.data.Sign;

						this.Curr_t = res.data.data.Curr_t;

						this.Curr_p = res.data.data.Curr_p;

						this.Recharge = res.data.data.Recharge;

					} else {

						vant.Toast(res.data.msg);

					}

				}).catch(err => {

					vant.Toast('请求发送失败，请重试');

				})

			},

			acqpm() {

				var index = this.$refs.acqpm.value

				console.log(index)

				axios.get(`/mobileapi/boss/index.php?act=ranking&daytype=${index}`).then(res => {

					console.log(res)

					this.Sign = res.data.data.Sign

					this.Curr_t = res.data.data.Curr_t

					this.Curr_p = res.data.data.Curr_p

					this.Recharge = res.data.data.Recharge

				}).catch(err => {

					// vant.Toast('请求发送失败，请重试');

				})

			},

			askpm() {

				var index = this.$refs.askpm.value

				console.log(index)

				axios.get(`/mobileapi/boss/index.php?act=ranking&daytype=${index}`).then(res => {

					console.log(res)

					this.Sign = res.data.data.Sign

					this.Curr_t = res.data.data.Curr_t

					this.Curr_p = res.data.data.Curr_p

					this.Recharge = res.data.data.Recharge

				}).catch(err => {

					// vant.Toast('请求发送失败，请重试');

				})

			},

			aczpm() {

				var index = this.$refs.aczpm.value

				console.log(index)

				axios.get(`/mobileapi/boss/index.php?act=ranking&daytype=${index}`).then(res => {

					console.log(res)

					this.Sign = res.data.data.Sign

					this.Curr_t = res.data.data.Curr_t

					this.Curr_p = res.data.data.Curr_p

					this.Recharge = res.data.data.Recharge

				}).catch(err => {

					// vant.Toast('请求发送失败，请重试');

				})

			},

			// 会员卡  筛选

			cardSelect(val) {

				this.cardActive = val;

				axios.get(`/mobileapi/boss/index.php?act=cardlist&daytype=${val}`).then(res => {

					if (res.data.code == 200) {

						this.Adviser1 = res.data.data.Adviser;

						this.League1 = res.data.data.League;

						this.Private1 = res.data.data.Private;

						this.Term1 = res.data.data.Term;

						this.Number1 = res.data.data.Number;

						this.Savings1 = res.data.data.Savings;

					} else {

						vant.Toast(res.data.msg);

					}

				}).catch(err => {

					vant.Toast('请求发送失败，请重试');

				})

			},

			// 员工  筛选

			staffSelect(val) {

				this.staffActive = val;

				axios.get(`/mobileapi/boss/index.php?act=staff&daytype=${val}`).then(res => {

					console.log(res)

					this.Maintain_user = res.data.data.Maintain_user

					this.Maintain_custom = res.data.data.Maintain_custom

					this.Follw_list = res.data.data.Follw_list

				}).catch(err => {

					// vant.Toast('请求发送失败，请重试');

				})

			},

			// whkypm() {

			// 	var index = this.$refs.whkypm.value

			// 	console.log(index)

			// 	axios.get(`/mobileapi/boss/index.php?act=staff&daytype=${index}`).then(res => {

			// 		console.log(res)

			// 		this.Maintain_user = res.data.data.Maintain_user

			// 		this.Maintain_custom = res.data.data.Maintain_custom

			// 		this.Follw_list = res.data.data.Follw_list

			// 	}).catch(err => {

			// 		// vant.Toast('请求发送失败，请重试');

			// 	})

			// },

			gjpm() {

				var index = this.$refs.gjpm.value

				console.log(index)

				axios.get(`/mobileapi/boss/index.php?act=staff&daytype=${index}`).then(res => {

					console.log(res)

					this.Maintain_user = res.data.data.Maintain_user

					this.Maintain_custom = res.data.data.Maintain_custom

					this.Follw_list = res.data.data.Follw_list

				}).catch(err => {

					// vant.Toast('请求发送失败，请重试');

				})

			},

			//课程  筛选

			courseSelect(val) {

				this.courseActive = val;

				axios.get(`/mobileapi/boss/index.php?act=curr&daytype=${val}`).then(res => {

					console.log(res)

					this.curr_t = res.data.data.curr_t

					this.curr_p = res.data.data.curr_p

				}).catch(err => {

					// vant.Toast('请求发送失败，请重试');

				})

			},

			tkkcpm() {

				var index = this.$refs.tkkcpm.value

				console.log(index)

				axios.get(`/mobileapi/boss/index.php?act=curr&daytype=${index}`).then(res => {

					console.log(res)

					this.curr_t = res.data.data.curr_t

					this.curr_p = res.data.data.curr_p

				}).catch(err => {

					// vant.Toast('请求发送失败，请重试');

				})

			},

			// sjkcpm() {

			// 	var index = this.$refs.sjkcpm.value

			// 	console.log(index)

			// 	axios.get(`/mobileapi/boss/index.php?act=curr&daytype=${index}`).then(res => {

			// 		console.log(res)

			// 		this.curr_t = res.data.data.curr_t

			// 		this.curr_p = res.data.data.curr_p

			// 	}).catch(err => {

			// 		// vant.Toast('请求发送失败，请重试');

			// 	})

			// },

			active(active) {

				this.active_course = active

			}

		}

	})

</script>



</html>